<template>
  <header class="header">
				<h1>todos</h1>
				<input class="new-todo" placeholder="What needs to be done?" autofocus @keydown.enter="add" v-model="title">
			</header>
</template>

<script>
export default {
    data(){
        return{
            title:"",
        }
    },
methods: {
    add(){
        this.$emit("add-todo",this.title)
        this.title=""
    }
}
}
</script>

<style>

</style>